package cn.ailearn.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName SwaggerConfig
 * @Description Swagger配置类
 * @Author WDEMO
 * @Date 2025/10/23 12:15
 */
@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("AI学习平台 API文档")
                        .version("1.0")
                        .description("AI学习平台的接口文档，提供用户管理、认证授权等功能")
                        .termsOfService("http://example.com/terms")
                        .license(new License().name("Apache 2.0").url("http://springdoc.org")));
    }
}
